Viewing Logs

Max Gallup
Hardware Lead, Project Administrator
When debugging your program, the easiest thing to do first is to check any log messages that your program emits. These can be viewed from roverctl-web, but sometimes you might prefer to see the actual files that store all logs. In order to take a look at these logs, we need to open a shell on the debix. This means we need to connect to it either using SSH or with the UART Cable (see methods 2 and 3 from connection to the rover). All log files are stored in a temporary directory: /tmp/roverlog
. Since it's part of the /tmp
directory, it lives on RAM as opposed to the disk which means that after a reboot all logs will be removed. Take a look into the this directory with ls -lah /tmp/roverlog/
and you will find the log file of the service you are interested in. They are named intuitively using the scheme "author-service-version.log".
For example, if we want to watch the controller log files live as they update, we can use the following command:
tail -f /tmp/roverlog/vu-ase-controller-1.4.0.log
However, sometimes you might run into issues with roverctl. To dig deeper, we want to live view the logs from roverd
since it is the endpoint that roverctl talks to. For this, we have conveniently named command that you can run to start viewing the logs of roverd:
sudo journalctl -u roverd -f
Alternatively, omitting the -f
flag lets you scroll through the entire history of roverd's logs:
sudo journalctl -u roverd
Finally, some problems might require digging into the logs of the linux kernel. For that we can use the following command to view any kernel messages live:
dmesg -H -w
Similarly, omitting the -w
flag lets you scroll:
dmesg -H